Immediately exits the current activity without processing any pending navigation requests and without saving any data model values that have not been committed.
Parent Type: LearningSession
Namespace: Microsoft.LearningComponents
Assembly: Microsoft.LearningComponents.dll
| C# |
|
public virtual void ExitCurrentActivity () |
| Exception type | Condition |
| InvalidOperationException | Thrown if there is no current activity in the session. |
| SequencingException | Thrown if the state of the session, such as the current sequencing rules, do not allow processing the requested navigation. |
It is recommended the application call CommitChanges after exiting the current activity to ensure changes made by this method are saved.
If the caller wants to be able to resume the current activity at a future time, it should set the NavigationRequest.ExitMode value of LearningDataModel.NavigationRequest to Suspend before calling this method.
In SCORM 2004 Content: This method will process the postConditionRules for the current activity. This may result in another activity becoming the current activity in the session. It may also result in not being able to identify a current activity for the session.
In SCORM 1.2 and LRM Content: This method will exit the current activity and make no effort to identify another activity for delivery.